/*  1:   */ package org.jetbrains.jps.model.artifact.impl.elements;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsElementCollection;
import org.jetbrains.jps.model.artifact.elements.JpsCompositePackagingElement;
import org.jetbrains.jps.model.artifact.elements.JpsPackagingElement;
import org.jetbrains.jps.model.ex.JpsCompositeElementBase;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.ex.JpsElementCollectionRole;

import java.util.List;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */ 
/* 13:   */ public abstract class JpsCompositePackagingElementBase<Self extends JpsCompositePackagingElementBase<Self>>
/* 14:   */   extends JpsCompositeElementBase<Self>
/* 15:   */   implements JpsCompositePackagingElement
/* 16:   */ {
/* 17:32 */   private static final JpsElementCollectionRole<JpsPackagingElement> a = JpsElementCollectionRole.create(JpsElementChildRoleBase.create("child"));
/* 18:   */   
/* 19:   */   protected JpsCompositePackagingElementBase()
/* 20:   */   {
/* 21:35 */     this.myContainer.setChild(a);
/* 22:   */   }
/* 23:   */   
/* 24:   */   protected JpsCompositePackagingElementBase(JpsCompositePackagingElementBase<Self> paramJpsCompositePackagingElementBase)
/* 25:   */   {
/* 26:39 */     super(paramJpsCompositePackagingElementBase);
/* 27:   */   }
/* 28:   */   
/* 29:   */   @NotNull
/* 30:   */   public List<JpsPackagingElement> getChildren()
/* 31:   */   {
/* 32:45 */     List tmp18_13 = ((JpsElementCollection)this.myContainer.getChild(a)).getElements();
/* 33:45 */     if (tmp18_13 == null) {
/* 34:45 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/artifact/impl/elements/JpsCompositePackagingElementBase", "getChildren" }));
/* 35:   */     }
/* 36:45 */     return tmp18_13;
/* 37:   */   }
/* 38:   */   
/* 39:   */   public <E extends JpsPackagingElement> E addChild(@NotNull E paramE)
/* 40:   */   {
/* 41:51 */     if (paramE == null) {
/* 42:51 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/artifact/impl/elements/JpsCompositePackagingElementBase", "addChild" }));
/* 43:   */     }
/* 44:51 */     return (JpsPackagingElement)((JpsElementCollection)this.myContainer.getChild(a)).addChild(paramE);
/* 45:   */   }
/* 46:   */   
/* 47:   */   public void removeChild(@NotNull JpsPackagingElement paramJpsPackagingElement)
/* 48:   */   {
/* 49:56 */     if (paramJpsPackagingElement == null) {
/* 50:56 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/artifact/impl/elements/JpsCompositePackagingElementBase", "removeChild" }));
/* 51:   */     }
/* 52:56 */     ((JpsElementCollection)this.myContainer.getChild(a)).removeChild(paramJpsPackagingElement);
/* 53:   */   }
/* 54:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.artifact.impl.elements.JpsCompositePackagingElementBase

 * JD-Core Version:    0.7.0.1

 */